package model

import "gorm.io/gorm"

type Shop struct {
	gorm.Model
	Img   string  `gorm:"type:varchar(500)"json:"img"`
	Name  string  `gorm:"type:varchar(30)"json:"name"`
	Price float64 `gorm:"type:decimal(10,2)"json:"price"`
	Num   int     `gorm:"type:int(11)"json:"num"`
}
type Cart struct {
	gorm.Model
	ShopId   int     `gorm:"type:int(11)"json:"shopId"`
	Quantity int     `gorm:"type:int(11)"json:"quantity"`
	Money    float64 `gorm:"type:decimal(10,2)"json:"money"`
}

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)"json:"username"`
	Password string `gorm:"type:char(32)"json:"password"`
}
type Questions struct {
	gorm.Model
	UserId int    `gorm:"type:int(11)"json:"userId"`
	Issue  string `gorm:"type:varchar(30)"json:"issue"`
}
type Reply struct {
	gorm.Model
	UserId  int    `gorm:"type:int(11)"json:"userId"`
	QueId   int    `gorm:"type:int(11)"json:"queId"`
	Content string `gorm:"type:varchar(300)"json:"content"`
}
type Like struct {
	gorm.Model
	UserId int `gorm:"type:int(11)"json:"userId"`
	Num    int `gorm:"type:int(11)"json:"num"`
}
type Collection struct {
	gorm.Model
	UserId   int `gorm:"type:int(11)"json:"userId"`
	Quantity int `gorm:"type:int(11)"json:"quantity"`
}
